package com.anydata.android.weatherforecast.weather.shell;

import android.content.Context;
import android.content.DialogInterface;
import android.preference.ListPreference;
import android.util.AttributeSet;

public class CityListPreference extends ListPreference {

	AddCityDialog ad;
	
	public CityListPreference(Context context) {
		super(context);
	}

	public CityListPreference(Context c, AttributeSet a){
		super(c, a);
	}
	
	@Override
	public void onClick (DialogInterface dialog, int which){
		
		if(which == -1)
			super.onClick(dialog, which);//super.onc
		else{
			ad = new AddCityDialog(this.getContext(), this);
			ad.show();
		}
	}
}
